﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Candy.Model
{
    public interface IImportService
    {
        Task<ImportReadResult> ReadAsync(string importText);

        event EventHandler<ImportErrorEventArgs> ImportError;
    }

    public class ImportReadResult
    {
        public IEnumerable<ImportItem> Items { get; set; }
        public bool HasErrors { get; set; }
        public List<string> Errors { get; set; }
        public ImportReadResult()
        {
            Errors = new List<string>();

        }
    }

    public class ImportErrorEventArgs : EventArgs
    {
        public string Error { get; private set; }
        public ImportErrorEventArgs(string error)
        {
            Error = error;
        }
    }
}
